using System;
using System.Collections.Generic;
using System.Windows.Forms;

namespace FluentBinding.WinForms.Controls
{
    /// <typeparam name="E">Type of the root entity</typeparam>
    /// <typeparam name="P">Type of the property in the data-bound control</typeparam>
    public interface IComboBoxSelectedItemBinding<E, P> :
        ISupportBindingDependencies<E, P>,
        ISupportEntityNotifications<E, P>
        //, ISupportUpdateMode<E, P>
        where P : class
    {
        #region Public methods

        IComboBoxSelectedItemBinding<E, P> To(Func<E, P> selector);

        IComboBoxSelectedItemBinding<E, P> To(Func<E, P> selector, Action<E, P> initializer);

        IComboBoxSelectedItemBinding<E, P> WithDataSource(Func<E, IEnumerable<P>> dataSource,
                                                          Func<P, string> displayMember);

        IComboBoxSelectedItemBinding<E, P> WithDataSource(Func<E, IEnumerable<P>> dataSource,
                                                          Func<P, string> displayMember, string noSelectionText);

        IPropertyBinding<E, P> WithDataSourceUpdateMode(DataSourceUpdateMode updateMode);

        #endregion
    }
}